1. Field
Embodiments relate to a method, system, and program for generating parity data for a system of organization, such as a RAID system.
2. Description of the Related Art
Various techniques have been proposed for organizing data stored in data storage devices such as disk drives. One such data storage organization is referred to as Redundant Array of Independent (or Inexpensive) Disks or (RAID). In a RAID organization, two or more disk drives are employed in combination to improve fault tolerance or performance, or both. There are different types of RAID data storage organizations and these different types are often referred to as RAID levels 0, 1, 2 . . . .
In a RAID level 0 data organization, for example, the data of a user file is “striped”, that is, blocks of user data are spread across multiple disks to improve performance. However, there is generally no redundancy provided for recovery of data should one of the drives fail in a RAID level 0 organization of data. A RAID level 3 organization of data is similar to RAID level 0 but one disk is typically reserved to store error correction data, often referred to as “parity data.” This parity data may be used to reconstruct lost user data should one of the drives fail. In a RAID level 5 data organization, parity data is provided for each stripe of data across the array of disk drives and no particular disk drive is dedicated to storing the parity data. Instead, blocks of parity data for the stripes of user data are distributed throughout all the disks of the array, to further improve performance.
In one RAID-5 organization, there is one block of parity data for each stripe of data across the array of disk drives. Such an arrangement provides ready reconstruction of data should one drive fail. Some storage applications can benefit from more robust data protection should more than one drive fail. Additional RAID schemes have been developed which generally have two blocks of parity data for each stripe of data. One known parity scheme includes a “Horizontal” parity block and a “Diagonal” parity block. Terms such as RAID-5DP (dual parity) or RAID-6 have been used in the storage industry for these or similar data organizational arrangements.
FIG. 1 illustrates logical operations which may be performed to generate new parity data when updating old data on a stripe such as stripe n in a RAID system with new data. As shown in FIG. 1, an Exclusive-OR logical function may be performed on the new data 30 and the old data 32 of stripe n. The result of the Exclusive-OR function be Exclusive-OR'ed with the old parity data 34 of stripe n to generate the new parity data 36 for stripe n. The new parity data 36 may be used to overwrite the old parity data 34 on the appropriate RAID storage unit and the new data 30 may be used to overwrite the old data 32 on the appropriate RAID storage unit.
FIG. 2 shows an example of a prior art logic engine 50 of a RAID storage processor for generating a new parity data when writing new data to the RAID storage units in accordance with the logic functions of FIG. 1. The logic engine 50 has a store queue 52 which can perform an Exclusive-OR logical function on the contents of the store queue 52 as represented by an arrow 54 and the data being presented at its input as represented by an arrow 56. The Intel 80303 integrated circuit chip has a similar logic engine referred to as an Application Accelerator Unit (AAU).
The operations of the logic engine 50 of FIG. 2 in generating new parity data is represented in FIG. 3. Upon resetting (block 60) the store queue 52, the new data 30 may be read (block 62) from a local memory 64 (FIG. 2) and stored in the store queue 52. Since the store queue 52 was previously reset, the new data 30 may be stored in the store queue 52 by performing an Exclusive-OR function with the new data 30 read from the local memory 64 and the reset contents of the store queue 52. The size of the read operation will typically depend upon the capacity of the store queue 52. Thus, if, for example, the capacity of the store queue 52 is 1K bytes, the read operation generally continues until the store queue 52 is filled with 1K bytes of new data 30.
The old data 32 which is to be replaced by the new data 30 may also be read (block 64) from the local memory 64 and Exclusive-OR'ed (block 66) with the new data 30 previously stored in the store queue 52, and stored as an intermediate result in the store queue 52. In a third read operation, the old parity data 34 is read (block 68) from the local memory 64 and Exclusive-OR'ed (block 70) with the intermediate result previously stored in the store queue 52. The result of this last Exclusive-OR operation will be the new parity data 36 which may be stored in the store queue 52 for subsequent transfer to the local memory 64 and the stripe n of the storage drives.
Notwithstanding, there is a continued need in the art to improve the performance of processors in data storage organization.